#!/usr/bin/env python
# -*- coding:utf-8 -*-
# ip查询
def ipdw(ip):
    url = 'https://restapi.amap.com/v3/ip?ip=%s&key=d7c4f8b2b484585de0c319f9b8ca4652&output=json'%ip

    import requests
    poo  = requests.get(url)
    data = poo.json()
    data = data['province']+data['city']
    return data
